<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@page pageEncoding="UTF-8" contentType="text/html; UTF-8" isELIgnored="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>超市账单管理系统-供应商管理</title>
<link type="text/css" rel="stylesheet" href="../css/style.css">
</head>
<body>

	<div class="menu">

		<table>
			<tbody>
				<tr>
					<td><form method="post" action="${pageContext.request.contextPath}/supplier/search">
							<input name="method" value="query" class="input-text" type="hidden"> 供应商名称：<input name="supplierName" class="input-text" type="text" value="">&nbsp;&nbsp;&nbsp;&nbsp;
							<input value="查 询" type="submit">
						</form>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="main">

		<div class="optitle clearfix">
			<em><input value="添加供应商" class="input-button" onclick="window.location='${pageContext.request.contextPath}/provider/providerAdd.jsp'" type="button">
			</em>
			<div class="title">
				供应商管理&gt;&gt;
			</div>
		</div>
		<div class="content">
			<table class="list">
				<tbody>
					<tr>
						<td width="70" height="29"><div class="STYLE1" align="center">编号</div>
						</td>
						<td width="80"><div class="STYLE1" align="center">供应商名称</div>
						</td>
						<td width="80"><div class="STYLE1" align="center">联系人</div>
						</td>
						<td width="100"><div class="STYLE1" align="center">联系电话</div>
						</td>
						<td width="100"><div class="STYLE1" align="center">邮箱</div>
						</td>
						<td width="120"><div class="STYLE1" align="center">操作</div></td>
					</tr>
					<c:forEach items="${requestScope.suppliers}" var="supplier">
						<tr>
							<td height="23"><span class="STYLE1">${supplier.supplierID}</span>
							</td>
							<td><span class="STYLE1"><a href="showdetail?supplierName=${supplier.supplierName}" style="color:red"> ${supplier.supplierName}</a>
						</span>
							</td>
							<td><span class="STYLE1">${supplier.contactPerson}</span>
							</td>
							<td><span class="STYLE1">${supplier.contactPhone}</span>
							</td>
							<td><span class="STYLE1">${supplier.contactEmail}</span>
							</td>
							<td width="120"><div>
								<input type="button" value="编辑" class="input-button"
									   onclick="window.location='${pageContext.request.contextPath}/supplier/showdetail?supplierName=${supplier.supplierName}'">
								<input type="button" value="删除" class="input-button"
									   onclick="if(confirm('确定删除该客户？')){window.location='${pageContext.request.contextPath}/supplier/delete?supplierID=${supplier.supplierID}';}">
							</div></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>

</body></html>